/**
 * 
 */
package com.easidea.tim.entity.finance;

import javax.persistence.Column;
import javax.persistence.Entity;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.springside.core.dao.extend.Undeletable;

import com.easidea.tim.entity.BaseEntity;

/**
 * 财务科目
 * @author Harrison
 *
 */
@Entity(name="tim_finance_item")
@org.hibernate.annotations.Entity(dynamicInsert=true, dynamicUpdate=true)
@Cache(region="tim_finance_item", usage=CacheConcurrencyStrategy.READ_WRITE)
@Undeletable(status="deleted")
public class FinanceItem extends BaseEntity {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1753858194862089132L;

	public static final Short FINANCE_ITEM_DIRECTION_DEBITED = 1; // 应收
	public static final Short FINANCE_ITEM_DIRECTION_CREDITED = -1;  // 应付
	
	private String name;
	private Short direction; // 记账方向
	private Boolean isCALRel; // 是否与客户收支信息关联
	
	/**
	 * @return the name
	 */
	@Column(name="name" , nullable=false)
	public String getName() {
		return name;
	}
	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * @return the direction
	 */
	@Column(name="direction", nullable=false)
	public Short getDirection() {
		return direction;
	}
	/**
	 * @param direction the direction to set
	 */
	public void setDirection(Short direction) {
		this.direction = direction;
	}
	/**
	 * @return the isCALRel
	 */
	@Column(name="is_cal_relavancy")
	public Boolean getIsCALRel() {
		return isCALRel;
	}
	/**
	 * @param isCALRel the isCALRel to set
	 */
	public void setIsCALRel(Boolean isCALRel) {
		this.isCALRel = isCALRel;
	}
	
}
